@echo off

if %JDK_HOME%.==. goto SETHOME

del lang\*.class
del io\*.class
del util\*.class

echo Compiling ...
%JDK_HOME%\bin\javac -target 1.1 -bootclasspath ..\ lang\*.java io\*.java util\*.java
if errorlevel==1 goto ERROR

echo Making jar file...
cd..
%JDK_HOME%\bin\jar cf java.jar java\lang\*.class java\io\*.class java\util\*.class
copy java.jar ..\lib
cd java

echo Process completed successully
goto EXIT

:ERROR
echo Compilation error
goto EXIT

:SETHOME
echo Missing JDK_HOME environment variable. For example: SET JDK_HOME=C:\JDK1.3

:EXIT




